package net.alpcontrol.bi.bootstrap.exception;

public class AlpException extends RuntimeException
{
  private String code;

  public AlpException(String code, String message)
  {
    super(message);
    this.code = code;
  }

  public AlpException(String message) {
    super(message);
    this.code = "101";
  }

  public AlpException(String code, String message, Throwable cause) {
    super(message, cause);
    this.code = code;
  }

  public AlpException(Throwable cause) {
    super(cause);
    this.code = "101";
  }

  public String getCode() {
    return this.code;
  }

  public void setCode(String code) {
    this.code = code;
  }

  @Override
  public String toString()
  {
    return "[code]:" + this.code + ", [message]:" + getMessage();
  }
}
